<meta content="telephone=no" name="format-detection" />
<title>{$sys_name} - {$lang.tx}</title>
<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <!-- Bootstrap -->
    <link href="/css/css/bootstrap.min.css" rel="stylesheet">
    <link href="/css/css/reset.css" rel="stylesheet">
    <link href="/css/css/style.css" rel="stylesheet">
    <script src="/js/js/jquery-1.11.3.min.js" type="text/javascript"></script>
    <script src="/js/js/respond.js" type="text/javascript"></script>
    <script src="/js/js/common.js" type="text/javascript"></script>
    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="//cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<style>
    .nav_list ul li ul{
        display: block;
    }
    .nav_list ul li em{
        border-right: 0 !important;
        border-left: 1px solid;
    }
    input::-webkit-input-placeholder {
        /* placeholder颜色  */
        color: #ccd5e0;
        /* placeholder字体大小  */
        font-size: 12px;
    }
</style>
<body class="bg">
<!--头部-->
<include file="Public/Home/Pubheader.html" />
<section class="wrapper">
    <!--左侧导航-->
    <include file="Public/Home/Menu.html" />

    <div class="content-area">
        <div class="t80"></div>
        <div class="z_top">
            <div class="location">
                <img src="images/location.png" alt="">
                <span>{$lang.ur_here}：{$lang.tx}</span>
            </div>
        </div>
        <div class="content">
            <div class="main_top bq_bg">
                <div class="font18 f2">
                    <img src="images/top_icon3.png" alt="">
                    <p style="margin-top: 10px;width: 70%">
                        {$lang.zhye}：<span>{$usermoney}</span><em>{$B}</em>
                    </p>
                </div>

            </div>
            <div class="row team">
                <div class="col-md-6 col-sm-12 ">
                    <div class="block">
                        <div class="block_title">
                            <span>{$lang.tx}</span>
                        </div>
                        <div class="cz_list">
                            <form action="{:U('User/tx_done')}" method="post" id="MyForm"  name="MyForm">
                                <div class="media align-items-center cz_form" style="display: none">
                                    <span class="cz_font">币&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;种</span>
                                    <div class="media-body">
                                        <select class="sele">
                                            <option value="">LTC</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="media align-items-center cz_form">
                                    <span class="cz_font">{$lang.tx}{$lang.num}</span>
                                    <div class="media-body">
                                        <input type="text" name="tx_num" id="tx_num" class="sele txnum" placeholder="最小提现 {$min_tx}" value="">
                                    </div>
                                </div>
                                <div class=" fx_c">
                                    <div class="media align-items-center cz_form">
                                        <span class="cz_font qbdz1">提币地址</span>
                                        <div class="media-body ">
                                            <div class="fx_in1 txnum1" >
                                                <input type="text" name="qbdz" id="qbdz" readonly value="{$txdz}"  <if condition="$txdz eq ''">onclick="changeaddress()"</if>   >
                                                <img src="images/fx_ico2.png" class="fx_code" style="display: none">
                                                <img src="images/fx_ico1.png"style="" onclick="changeaddress()">
                                            </div>
                                            <div class="code">
                                                <img src="images/code.jpg" alt="">
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <div class="media align-items-center cz_form">
                                    <span class="cz_font"></span>
                                    <div class="media-body">
                                        <div class="cz_text" id="cz_text">
                                        </div>
                                        <textarea id="gzjs_cont" style="display: none">{$txsm}</textarea>
                                    </div>
                                    <script type="text/javascript">
                                        document.getElementById("cz_text").innerHTML = $("#gzjs_cont").val();
                                    </script>
                                </div>
                                <div class="media align-items-center cz_form">
                                    <span class="cz_font"></span>
                                    <div class="media-body">
                                        <input type="hidden" value="{$tx_on}" id="tx_on">
                                        <input type="hidden" value="{$min_tx}" id="min_tx">
                                        <if condition="$tx_on eq 0">
                                            <input type="button"  class="cz_btn" value="暂停提现">
                                            <else/>
                                            <input type="button" id="cz_btn" class="cz_btn" value="提现">
                                        </if>

                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
                <div id="sysmsg1" class="sysmsg sysmsg1">
                    <h3>{$lang.txdz}</h3>
                    <form action="{:U('User/tx_address')}"  method="post" name="address_form" id="address_form">
                        <div id="showmsg1" class="showmsg showmsg1" style="padding: 0 10px">
                            <div style="width: 100%;float: left">
                               <div style="float: left;color: #9d9d9d;font-size: 14px" class="w_30">{$lang.txdz}：</div>
                                <input type="text" value="" name="new_txdz" class="new_txdz" style="border: 1px solid #dddddd;float:left">
                            </div>
                            <div style="width: 100%;float: left">
                                <div style="float: left;color: #9d9d9d;font-size: 14px" class="w_30">{$lang.emailcode}：</div>
                                <input type="text" value="" name="code"  class="txdz_code"  style="border: 1px solid #dddddd">
                                <input type="button" onclick="send_eml1()" id="yzm1" value="发送安全码" class="txdz_send">
                            </div>
                            <input type="hidden" value="{$user_name}" id="username">
                            <div style="width: 60%;margin: auto">
                                <div class="sub_txdz" onclick="subthis1()" style="cursor: pointer;width: 70px">确认修改</div>
                                <div class="close_txdz" onclick="closeaddress()" style="cursor: pointer;width: 70px">关闭</div>
                            </div>
                        </div>
                    </form>
                </div>
                <script type="text/javascript">
                    var time = 60;
                    function send_eml1(){
                        var email = $("#username").val();
                        $.ajax({
                            type:"GET",
                            url:"{:U('User/Index/sendEmail')}",
                            data:{email:email},
                            dataType: "json",
                            success:function(data){
                                if(data.error == 0){ //发送成功
                                    var timer=null;
                                    var t=time;
                                    var m=0;
                                    var s=0;
                                    m=Math.floor(t/60%60);
                                    m<10&&(m='0'+m);
                                    s=Math.floor(t%60);
                                    function countDown(){
                                        s--;
                                        s<10&&(s='0'+s);
                                        if(s.length>=3){
                                            s=59;
                                            m="0"+(Number(m)-1);
                                        }
                                        if(m.length>=3){
                                            m='00';
                                            s='00';
                                            clearInterval(timer);
                                        }

                                        document.getElementById("yzm1").value = "已发送 ("+ s +")";
                                        document.getElementById("yzm1").onclick= function(){};
                                        if(s == '00'){
                                            document.getElementById("yzm1").value = "发送安全码";
                                            document.getElementById("yzm1").onclick= send_eml;
                                        }
                                        console.log(s);
                                    }
                                    timer=setInterval(countDown,1000);
                                }else{
                                    document.getElementById("showmsg").innerHTML=data.msg;
                                    $("#sysmsg").show();
                                }
                            }
                        })
                    }

                    function changeaddress(){
                        $("#sysmsg1").show();
                    }
                    function closeaddress(){
                        $("#sysmsg1").hide();
                    }

                    function subthis1(){
                        document.getElementById("address_form").submit();
                    }
                </script>

                <script type="text/javascript">
                    $("#cz_btn").click(function(){
                        var num = $("#tx_num").val();
                        var qbdz = $("#qbdz").val();
                        var tx_on = $("#tx_on").val();
                        var min_tx = $("#min_tx").val();
                        if(tx_on == 1){
                            if(num){
                                if(parseFloat(num) < parseFloat(min_tx)){
                                    document.getElementById("showmsg").innerHTML= "提现数量不能少于"+min_tx;
                                    $("#sysmsg").show();
                                }else if(qbdz==''){
                                    document.getElementById("showmsg").innerHTML= "钱包地址不能为空";
                                    $("#sysmsg").show();
                                }else{
                                    document.MyForm.submit();
                                }
                            }else{
                                document.getElementById("showmsg").innerHTML= "请输入提现数量";
                                $("#sysmsg").show();
                            }
                        }else{
                            document.getElementById("showmsg").innerHTML= "系统暂时关闭提现！";
                            $("#sysmsg").show();
                        }
                    })
                </script>
                <div class="col-md-6 col-sm-12 t_20">
                    <div class="block">
                        <div class="block_title">
                            <span>{$lang.txjl}</span><span style="float: right;margin-right: 20px"><a href="{:U('User/zj_list?status=11')}">{$lang.ckmx}</a></span>
                        </div>
                        <div class="t_tab fx_tab t_0">
                            <table>
                                <tr>
                                    <td width="50%">金额</td>
                                    <td width="50%">日期</td>
                                </tr>
                                <foreach name="tx_list" item="item">
                                    <tr class="tab_bg">
                                        <td>
                                            <font color="#30c4a9">-{$item.num}</font>
                                        </td>
                                        <td>{:date('Y-m-d H:i:s',$item[addtime])}</td>
                                    </tr>
                                </foreach>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

</section>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="/js/js/bootstrap.js"></script>

<script type="text/javascript" language="javascript">
    var nav1 = document.getElementById("nav1");
    var links1 = nav1.getElementsByTagName("li");
    var lilen1 = nav1.getElementsByTagName("a");
    var currenturl1 = document.location.href;
    var last1 = 0;
    for (var i1=0;i1<links1.length;i1++)
    {
        var linkurl1 = lilen1[i1].getAttribute("href");
        if(currenturl1.indexOf(linkurl1)!=-1)
        {
            last1 = i1;
        }
    }

    links1[last1].className = "cur1";

</script>

<!--信息框-->
<include file="Public/Home/Showmsg.html" />

</body>

</html>
